﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_ViewAdmission : System.Web.UI.Page
{
    Service.Service s;

    protected void Page_Load(object sender, EventArgs e)
    {
        s = new Service.Service();
    }

    protected void LinkButton1_Click(object sender, EventArgs e)
    {

        LinkButton btnYes = (LinkButton)sender;
        string NameSubjects = btnYes.CommandName;
        int CodeSubjects = s.CodeSubjects(NameSubjects);
        int CodeProfileStudent =int.Parse(btnYes.CommandArgument);
        s.CheckAdmissionYes(CodeSubjects, CodeProfileStudent);
        Response.Redirect("ViewAdmission.aspx");
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {

        LinkButton btnYes = (LinkButton)sender;
        string NameSubjects = btnYes.CommandName;
        int CodeSubjects = s.CodeSubjects(NameSubjects);
        int CodeProfileStudent = int.Parse(btnYes.CommandArgument);
        s.CheckAdmissionNo(CodeSubjects, CodeProfileStudent);
        Response.Redirect("ViewAdmission.aspx");
    }
    protected void LinkButton3_Click(object sender, EventArgs e)
    {

        LinkButton btnYes = (LinkButton)sender;
        string NameSubjects = btnYes.CommandName;
        int CodeSubjects = s.CodeSubjects(NameSubjects);
        int CodeProfileStudent = int.Parse(btnYes.CommandArgument);
        s.CheckAdmissionWait(CodeSubjects, CodeProfileStudent);
        Response.Redirect("ViewAdmission.aspx");
    }
}